import NewPersonGroupComp from "containers/setting/person-group/new-person-group";
import PersonGroupDetailComp from "containers/setting/person-group/person-group-detail";
import PersonGroupComp from "containers/setting/person-group/person-group";


const getChildren= (parent)=>{
  return {
    // 新增人员组
    newPersonGroup: {
      key: 'new-person-group',
      url: `/main/setting/${parent}/new-person-group`,
      components: NewPersonGroupComp,
      parent,
    },
    // 新增人员组
    editPersonGroup: {
      key: 'edit-person-group',
      url: `/main/setting/${parent}/edit-person-group/:oid`,
      components: NewPersonGroupComp,
      parent,
    },
    // 人员组详情
    personGroupDetail: {
      key: 'person-group-detail',
      url: `/main/setting/${parent}/person-group-detail/:oid/:id`,
      components: PersonGroupDetailComp,
      parent
    }
  }
}
// 原人员组 防止菜单不见
export const PersonGroupMenu = {
  key: 'person-group',
  url: '/main/setting/person-group',
  components: PersonGroupComp,
  parent: 'setting',
  children: getChildren('person-group')
};

// // 集团人员组
// export const PersonGroupTenantMenu = {
//   key: 'person-group',
//   url: '/main/setting/person-group',
//   components: PersonGroupComp,
//   parent: 'setting',
//   children:  getChildren('person-group')
// };
// // 公司人员组
// export const PersonGroupCompanyMenu = {
//   key: 'person-group-company',
//   url: '/main/setting/person-group-company',
//   components: PersonGroupComp,
//   parent: 'setting',
//   children: getChildren('person-group-company')
// };

